Skip to content

chore(examples): minor improvements to async-user-confirmation and dependencies updates #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025

Conversation

cristiandouce
Copy link
Contributor

This pull request introduces significant updates to the async-user-confirmation examples, focusing on restructuring imports, enhancing authentication, and improving the architecture for agent-based chat functionality. The most important changes include reorganizing file paths and imports, integrating Auth0 authentication with async user confirmation, and refactoring the agent and memory management for better modularity and scalability.

File Path and Import Restructuring:

  • Updated imports across multiple files to use the src directory structure for better organization and clarity. For example, imports in agent.py, conditional_trade.py, and tools/conditional_trade.py were updated to use src.agents paths. [1] [2] [3]

Dependency Updates:

  • Updated dependencies in pyproject.toml files for both langchain-examples and llama-index-examples, including version bumps for langgraph-api, langgraph-runtime-inmem, and the addition of auth0-server-python. [1] [2]

Auth0 Integration:

  • Introduced a new auth0 module in the llama-index-examples, which includes auth.py, auth0_ai.py, and routes.py for handling authentication, async user confirmation, and session management. This includes implementing ServerClient and with_async_user_confirmation for secure and interactive user authentication. [1] [2] [3]

Agent and Memory Refactoring:

  • Added get_agent and get_memory functions in agent.py and memory.py, respectively, to modularize the creation and management of agents and memory buffers. This improves scalability and reusability for chat-based applications. [1] [2]

Application Logic Enhancements:

  • Refactored app.py to simplify the application logic by delegating authentication routes to a blueprint and improving the chat handling flow with session-based validation and memory integration.

These changes collectively enhance the maintainability, modularity, and functionality of the async-user-confirmation examples.

@cristiandouce cristiandouce merged commit a5ffd42 into main May 14, 2025
1 check passed
@cristiandouce cristiandouce deleted the minor-improvements branch May 14, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants